package com.simple.behavior.classandclass.chainofresponsibility;

import com.simple.LogUtil;

/**
 * @author simple
 * @version 1.0
 * @date 2019-01-04 17:56
 * @since 1.0
 */
public class MyHandler extends AbstractHandler implements Handler {
    private String name;

    public MyHandler(String name) {
        this.name = name;
    }

    @Override
    public void operator() {
        LogUtil.info(name + " deal!");
        if (null != getHandler()) {
            getHandler().operator();
        }
    }
}
